import { readFileSync } from "fs";
import Namer from "./namer.js";
import path, { dirname } from "path";

const defaultBook = "cifu";
const familyName = "张";
const gender = 0; // 0 男, 1 女
const nameAccount = 6;

async function main() {
  const namer = new Namer();
  await namer.loadBook(defaultBook);

  const name = namer.genName(familyName);

  const items = [];
  for (let i = 0; i < nameAccount; i++) {
    const item = namer.genName(familyName);
    items.push(item);
  }

  const names = items.filter((item) => !!item).map((item) => item.name);
  console.log(names);
}

main();
